package timing.ukulele.third.convertor.weixin;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;
import timing.ukulele.common.data.DtoBaseDataConverter;
import timing.ukulele.data.third.data.weixin.WxMsgDTO;
import timing.ukulele.data.third.view.weixin.WxMsgVO;
import timing.ukulele.third.persistent.weixin.WxMsg;

@Mapper
public interface WxMsgConverter extends DtoBaseDataConverter<WxMsg, WxMsgDTO, WxMsgVO> {
    WxMsgConverter INSTANCE = Mappers.getMapper(WxMsgConverter.class);

    @Override
    @Mappings({
            @Mapping(target = "createBy", ignore = true),
            @Mapping(target = "createTime", ignore = true),
            @Mapping(target = "updateBy", ignore = true),
            @Mapping(target = "updateTime", ignore = true),
    })
    WxMsg v2p(WxMsgVO vo);

    @Override
    WxMsgVO p2v(WxMsg po);

}
